<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<div id="app">
			<user-component></user-component>
		</div>
		
		<template id="userTemplate">
			<div>
				{{username}}
			</div>
		</template>
		
		<script src="../../js/vue.js" type="text/javascript" charset="utf-8"></script>
		
		<script type="text/javascript">
			let userComponent = {
				data: function(){
					return{
						username: "zhangsan"
					}
				},
				template: "#userTemplate",
				methods:{}
			}
			
			
			const vue = new Vue({
				el: "#app",
				data: {},
				methods: {},
				mounted() {
					
				},
				components:{
					//如果组件的key和value相同的话，可以简化为key
					userComponent
				}
			})
		</script>
		
	</body>
</html>
